package com.qf.fmall2203.index.mapper;

import com.qf.fmall2203.index.entity.Category;
import com.qf.fmall2203.index.entity.IndexImg;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qf.fmall2203.index.entity.Product;
import com.qf.fmall2203.index.entity.ProductImg;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 轮播图  Mapper 接口
 * </p>
 *
 * @author ljc
 * @since 2023-02-13
 */
@Mapper
public interface IndexImgMapper extends BaseMapper<IndexImg> {
    @Select("select * from index_img")
    List<IndexImg> selectAll();

    List<Product> getListR();

    List<ProductImg> getImage(@Param("productId") String productId);

    List<Category> getOneLevel();

    List<Category> getTowLevel(@Param("id") Integer categoryId);

    List<Category> getThreeLevel(@Param("id") Integer categoryId);

    List<Product> getOneLevelProducts(@Param("id") Integer categoryId);
}
